package com.yunbao.ioc.bd;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by louisyuu on 2020/3/3 下午3:19
 */
public class BeanDefinition {


    private String id;


    private String beanClassName;

    private Class<?> beanClass;


    private List<PropertyValue> propertyValues = new ArrayList<>();

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getBeanClassName() {
        return beanClassName;
    }

    public void setBeanClassName(String beanClassName) {
        this.beanClassName = beanClassName;
    }


    public Class<?> getBeanClass() {
        try {
            return Class.forName(this.beanClassName);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        return null;

    }

    public void setBeanClass(Class<?> beanClass) {
        this.beanClass = beanClass;
    }

    public void addPropertyValues(PropertyValue propertyValue) {
        this.propertyValues.add(propertyValue);
    }


    public List<PropertyValue> getPropertyValues() {
        return propertyValues;
    }

    public void setPropertyValues(List<PropertyValue> propertyValues) {
        this.propertyValues = propertyValues;
    }
}
